package cn.iocoder.yudao.module.ym.controller.admin.ticket.vo;

import cn.iocoder.yudao.module.infra.enums.DictTypeConstants;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.ym.dal.dataobject.area.AreaDO;
import cn.iocoder.yudao.module.ym.dal.dataobject.site.SiteDO;
import cn.iocoder.yudao.module.ym.dal.dataobject.ticketlog.TicketLogDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 工单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class TicketRespVO {


    @Schema(description = "工单编号	")
    @ExcelProperty("工单编号	")
    private String ticketNumber;

    @ExcelProperty("区域")
    private String areaName;

    @ExcelProperty("电站")
    private String siteName;

    @Schema(description = "充电桩ID")
    @ExcelProperty("充电桩ID")
    private String chargingPileId;

    @ExcelProperty("指派人")
    private String operatorName;

    @Schema(description = "工单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "工单类型", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.YM_WORD_TEMP_TYPE)
    private Integer ticketType;

    @Schema(description = "工单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "工单状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.YM_WO_STATUS)
    private Integer ticketStatus;


    @Schema(description = "优先级", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "优先级", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.YM_WO_LEVEL)
    private Integer ticketLevel;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("工单创建时间")
    private LocalDateTime createTime;

    @Schema(description = "工单描述")
    @ExcelProperty("工单描述")
    private String ticketDesc;

    @Schema(description = "故障描述")
    @ExcelProperty("故障描述")
    private String faultDesc;

    @Schema(description = "故障图片")
    @ExcelProperty("故障图片")
    private String faultImage;

    @Schema(description = "超时时长", example = "2")
    @ExcelProperty("超时时长")
    private Integer timeoutHour;

    @Schema(description = "接单时间")
    @ExcelProperty("接单时间")
    private LocalDateTime startTime;

    @Schema(description = "完单时间")
    @ExcelProperty("完单时间")
    private LocalDateTime endTime;

    @Schema(description = "处理情况")
    @ExcelProperty("处理情况")
    private String processing;

    @Schema(description = "巡检检查项")
    @ExcelProperty("巡检检查项")
    private String inspectionItem;

    // ----------------

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "27491")
    @ExcelIgnore
    private Long id;

    @Schema(description = "状态", example = "2")
    @ExcelIgnore
    private Integer status;

    @Schema(description = "备注", example = "你猜")
    @ExcelIgnore
    private String remark;

    @Schema(description = "公司id", example = "9581")
    @ExcelIgnore
    private Long deptId;

    @Schema(description = "第三主键", example = "23403")
    @ExcelIgnore
    private Integer thirdId;


    @Schema(description = "区域", requiredMode = Schema.RequiredMode.REQUIRED, example = "10318")
    @ExcelIgnore
    private Long areaId;

    @ExcelIgnore
    private AreaDO areaDO;

    @Schema(description = "电站", requiredMode = Schema.RequiredMode.REQUIRED, example = "10190")
    @ExcelIgnore
    private Long siteId;

    @ExcelIgnore
    private SiteDO siteDO;

    @Schema(description = "指派人", requiredMode = Schema.RequiredMode.REQUIRED, example = "5412")
    @ExcelIgnore
    private Long operatorId;

    @ExcelIgnore
    private AdminUserDO adminUserDO;

    @Schema(description = "几小时超时")
    @ExcelIgnore
    private double hour;

    @Schema(description = "重新派发时间")
    @ExcelIgnore
    private LocalDateTime redistributeTime;

    @ExcelIgnore
    private List<TicketLogDO> ticketLogDOS;

    @ExcelIgnore
    private String deptName;

}